import { request } from '@/utils'
const register = (data) => {
    return request({
        url: '/addAdminUser',
        method: 'post',
        data
    })
}

const login = (data) => {
    return request({
        url: '/login',
        method: 'post',
        data
    })
}

const getUserInfo = () => {
    return request({
        url: '/getUserInfo',
        method: 'get',
    })
}

const uploadFile = (data) => {
    return request({
        url: '/upload',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}
const getRoleMenus = () => {
    return request({
        url: '/menus/role',
        method: 'get',
    })

}


export default {
    register,
    login,
    getUserInfo,
    uploadFile,
    getRoleMenus
}


